<bc:ExGRID x:Class="SLS.Presentation.GridTableFOREIGNKEYLIST"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:exc="clr-namespace:SLS.Controls;assembly=CLSControls"
             xmlns:bc="clr-namespace:SLS.Base;assembly=CLSBase"
             xmlns:ldb="clr-namespace:SLS.Presentation.Data;assembly=FOREIGNKEYLISTTB"
             x:Name="Container" 
             ToolTip="{Binding DisplayName}"
             xmlns:meffed="http:\\www.codeplex.com\MEFedMVVM"            
            mc:Ignorable="d"             
           d:DesignHeight="300"
           d:DesignWidth="600"         
        >
    <bc:ExGRID.Resources>
    <ldb:FOREIGNKEYLISTDataSet  x:Key="SETUI" />
    <CollectionViewSource x:Key="vwBaseTable" Source="{Binding Path=FOREIGNKEYLIST,Source={StaticResource SETUI}}" />
    </bc:ExGRID.Resources>
    <StackPanel>
    <WrapPanel>
        <CheckBox Name="IsCheckDataQuality"
        IsChecked="False">CheckDataQuality</CheckBox>
        <Button Name="btnEditRecord"
                Width="Auto"
                Height="Auto"
                VerticalAlignment="Stretch"
                Click="btnEdit_Click">Edit</Button>
        <Button Name="btnEditProcessingRecord"
                Width="Auto"
                Height="Auto"
                VerticalAlignment="Stretch"
                Click="btnEditProcessingRecord_Click">ALL</Button>
     </WrapPanel>
    <WrapPanel>
        <exc:NMICD Name="NMICD"/>
    </WrapPanel>
    <exc:FilteringDataGrid 
          Name="MainGridData"
          ItemsSource="{Binding Source={DynamicResource ResourceKey=vwBaseTable}}"
          AutoGenerateColumns="False"
          IsSynchronizedWithCurrentItem="True"
          SelectionChanged="ItemsControls_SelectionChanged"
          SelectionMode="Extended"
          Height="Auto"
          ColumnWidth="SizeToHeader"
          SelectionUnit="FullRow">
        <DataGrid.Columns>
                <DataGridTextColumn x:Name="FID"
                                    Binding="{Binding Path=FID}"
                                    Header="FID"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="TYPE"
                                    Binding="{Binding Path=TYPE}"
                                    Header="TYPE"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="BUNIQUE"
                                    Binding="{Binding Path=BUNIQUE}"
                                    Header="BUNIQUE"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="FOREIGNKEY"
                                    Binding="{Binding Path=FOREIGNKEY}"
                                    Header="FOREIGNKEY"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="TBNAME"
                                    Binding="{Binding Path=TBNAME}"
                                    Header="TBNAME"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="TTTABLE"
                                    Binding="{Binding Path=TTTABLE}"
                                    Header="TTTABLE"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="CHECKINGTYPE"
                                    Binding="{Binding Path=CHECKINGTYPE}"
                                    Header="CHECKINGTYPE"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="UPDATETYPE"
                                    Binding="{Binding Path=UPDATETYPE}"
                                    Header="UPDATETYPE"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="YKREAL"
                                    Binding="{Binding Path=YKREAL}"
                                    Header="YKREAL"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="KEY0"
                                    Binding="{Binding Path=KEY0}"
                                    Header="KEY0"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="KEY1"
                                    Binding="{Binding Path=KEY1}"
                                    Header="KEY1"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="KEY2"
                                    Binding="{Binding Path=KEY2}"
                                    Header="KEY2"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="KEY3"
                                    Binding="{Binding Path=KEY3}"
                                    Header="KEY3"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="KEY4"
                                    Binding="{Binding Path=KEY4}"
                                    Header="KEY4"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="KEY5"
                                    Binding="{Binding Path=KEY5}"
                                    Header="KEY5"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="KEY6"
                                    Binding="{Binding Path=KEY6}"
                                    Header="KEY6"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="KEY7"
                                    Binding="{Binding Path=KEY7}"
                                    Header="KEY7"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="KEY8"
                                    Binding="{Binding Path=KEY8}"
                                    Header="KEY8"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="KEY9"
                                    Binding="{Binding Path=KEY9}"
                                    Header="KEY9"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="TFOREIGNKEY"
                                    Binding="{Binding Path=TFOREIGNKEY}"
                                    Header="TFOREIGNKEY"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="TKEY0"
                                    Binding="{Binding Path=TKEY0}"
                                    Header="TKEY0"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="TKEY1"
                                    Binding="{Binding Path=TKEY1}"
                                    Header="TKEY1"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="TKEY2"
                                    Binding="{Binding Path=TKEY2}"
                                    Header="TKEY2"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="TKEY3"
                                    Binding="{Binding Path=TKEY3}"
                                    Header="TKEY3"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="TKEY4"
                                    Binding="{Binding Path=TKEY4}"
                                    Header="TKEY4"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="TKEY5"
                                    Binding="{Binding Path=TKEY5}"
                                    Header="TKEY5"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="TKEY6"
                                    Binding="{Binding Path=TKEY6}"
                                    Header="TKEY6"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="TKEY7"
                                    Binding="{Binding Path=TKEY7}"
                                    Header="TKEY7"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="TKEY8"
                                    Binding="{Binding Path=TKEY8}"
                                    Header="TKEY8"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="TKEY9"
                                    Binding="{Binding Path=TKEY9}"
                                    Header="TKEY9"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="LDES"
                                    Binding="{Binding Path=LDES}"
                                    Header="LDES"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="SDES"
                                    Binding="{Binding Path=SDES}"
                                    Header="SDES"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="CONDITIONS"
                                    Binding="{Binding Path=CONDITIONS}"
                                    Header="CONDITIONS"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="FUSER"
                                    Binding="{Binding Path=FUSER}"
                                    Header="FUSER"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="FDATE"
                                    Binding="{Binding Path=FDATE}"
                                    Header="FDATE"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="LUSER"
                                    Binding="{Binding Path=LUSER}"
                                    Header="LUSER"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="LDATE"
                                    Binding="{Binding Path=LDATE}"
                                    Header="LDATE"
                                    Width="SizeToHeader" />
            </DataGrid.Columns>
          </exc:FilteringDataGrid>  
      </StackPanel>
</bc:ExGRID> 
  